using System;
using System.CodeDom.Compiler;
using System.Runtime.CompilerServices;
using System.Text;

namespace ClownFish
{
	public sealed class CompileException : Exception
	{
		[CompilerGenerated]
		private CompilerErrorCollection compilerErrorCollection_0;

		[CompilerGenerated]
		private Type[] type_0;

		public CompilerErrorCollection Errors
		{
			get;
			private set;
		}

		public Type[] Types
		{
			get;
			private set;
		}

		internal CompileException(string string_0, CompilerErrorCollection compilerErrorCollection_1, Type[] type_1) : base(string_0)
		{
			this.Errors = compilerErrorCollection_1;
			this.Types = type_1;
		}

		public string GetDetailMessages()
		{
			StringBuilder stringBuilder = new StringBuilder();
			if (this.Errors.Count > 0)
			{
				stringBuilder.AppendLine("编译错误消息：");
				foreach (CompilerError compilerError in this.Errors)
				{
					stringBuilder.AppendLine(compilerError.ErrorText);
				}
			}
			stringBuilder.AppendLine().AppendLine("正在编译的类型：");
			Type[] types = this.Types;
			for (int i = 0; i < types.Length; i++)
			{
				Type type = types[i];
				stringBuilder.AppendLine(type.FullName);
			}
			return stringBuilder.ToString();
		}
	}
}
